import 'dart:convert';

/// code : 0
/// data : {"insertAiGroupList":[{"aiGroupId":0,"alias":"","belongTo":"","description":"","index":0,"name":"","roleList":[{"avatarUrl":"","isExclusive":false,"isPrivate":false,"nickname":"","role":"","roleId":0,"sex":0,"type":0}]}],"list":[{"alias":"","defaultStatus":0,"id":0,"name":"","positionId":0,"ruleType":0,"url":""}]}
/// msg : ""
/// serverTime : 0

FoundTabListData foundTabListDataFromJson(String str) =>
    FoundTabListData.fromJson(json.decode(str));

String foundTabListDataToJson(FoundTabListData data) =>
    json.encode(data.toJson());

class FoundTabListData {
  FoundTabListData({
    int? code,
    Data? data,
    String? msg,
    String?  serverTime,
  }) {
    _code = code;
    _data = data;
    _msg = msg;
    _serverTime = serverTime;
  }

  bool isSuccess(){
    return _code==0||_code==200;
  }

  FoundTabListData.fromJson(dynamic json) {
    _code = json['code'];
    _data = json['data'] != null ? Data.fromJson(json['data']) : null;
    _msg = json['msg'];
    _serverTime = json['serverTime'];
  }

  int? _code;
  Data? _data;
  String? _msg;
  String?  _serverTime;

  FoundTabListData copyWith({
    int? code,
    Data? data,
    String? msg,
    String?  serverTime,
  }) =>
      FoundTabListData(
        code: code ?? _code,
        data: data ?? _data,
        msg: msg ?? _msg,
        serverTime: serverTime ?? _serverTime,
      );

  int? get code => _code;

  Data? get data => _data;

  String? get msg => _msg;

  String?  get serverTime => _serverTime;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['code'] = _code;
    if (_data != null) {
      map['data'] = _data?.toJson();
    }
    map['msg'] = _msg;
    map['serverTime'] = _serverTime;
    return map;
  }
}

/// insertAiGroupList : [{"aiGroupId":0,"alias":"","belongTo":"","description":"","index":0,"name":"","roleList":[{"avatarUrl":"","isExclusive":false,"isPrivate":false,"nickname":"","role":"","roleId":0,"sex":0,"type":0}]}]
/// list : [{"alias":"","defaultStatus":0,"id":0,"name":"","positionId":0,"ruleType":0,"url":""}]

Data dataFromJson(String str) => Data.fromJson(json.decode(str));

String dataToJson(Data data) => json.encode(data.toJson());

class Data {
  Data({
    List<InsertAiGroupList>? insertAiGroupList,
    List<FoundTab>? list,
  }) {
    _insertAiGroupList = insertAiGroupList;
    _list = list;
  }

  Data.fromJson(dynamic json) {
    if (json['insertAiGroupList'] != null) {
      _insertAiGroupList = [];
      json['insertAiGroupList'].forEach((v) {
        _insertAiGroupList?.add(InsertAiGroupList.fromJson(v));
      });
    }
    if (json['list'] != null) {
      _list = [];
      json['list'].forEach((v) {
        _list?.add(FoundTab.fromJson(v));
      });
    }
  }

  List<InsertAiGroupList>? _insertAiGroupList;
  List<FoundTab>? _list;

  Data copyWith({
    List<InsertAiGroupList>? insertAiGroupList,
    List<FoundTab>? list,
  }) =>
      Data(
        insertAiGroupList: insertAiGroupList ?? _insertAiGroupList,
        list: list ?? _list,
      );

  List<InsertAiGroupList>? get insertAiGroupList => _insertAiGroupList;

  List<FoundTab>? get list => _list;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    if (_insertAiGroupList != null) {
      map['insertAiGroupList'] =
          _insertAiGroupList?.map((v) => v.toJson()).toList();
    }
    if (_list != null) {
      map['list'] = _list?.map((v) => v.toJson()).toList();
    }
    return map;
  }
}

/// alias : ""
/// defaultStatus : 0
/// id : 0
/// name : ""
/// positionId : 0
/// ruleType : 0
/// url : ""

FoundTab listFromJson(String str) => FoundTab.fromJson(json.decode(str));

String listToJson(FoundTab data) => json.encode(data.toJson());

class FoundTab {
  FoundTab({
    String? alias,
    int? defaultStatus,
    String? id,
    String? name,
    int? positionId,
    int? ruleType,
    String? url,
  }) {
    _alias = alias;
    _defaultStatus = defaultStatus;
    _id = id;
    _name = name;
    _positionId = positionId;
    _ruleType = ruleType;
    _url = url;
  }

  FoundTab.fromJson(dynamic json) {
    _alias = json['alias'];
    _defaultStatus = json['defaultStatus'];
    _id = json['id'];
    _name = json['name'];
    _positionId = json['positionId'];
    _ruleType = json['ruleType'];
    _url = json['url'];
  }

  String? _alias;
  int? _defaultStatus;
  String? _id;
  String? _name;
  int? _positionId;
  int? _ruleType;
  String? _url;

  FoundTab copyWith({
    String? alias,
    int? defaultStatus,
    String? id,
    String? name,
    int? positionId,
    int? ruleType,
    String? url,
  }) =>
      FoundTab(
        alias: alias ?? _alias,
        defaultStatus: defaultStatus ?? _defaultStatus,
        id: id ?? _id,
        name: name ?? _name,
        positionId: positionId ?? _positionId,
        ruleType: ruleType ?? _ruleType,
        url: url ?? _url,
      );

  String? get alias => _alias;

  int? get defaultStatus => _defaultStatus;

  String? get id => _id;

  String? get name => _name;

  int? get positionId => _positionId;

  int? get ruleType => _ruleType;

  String? get url => _url;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['alias'] = _alias;
    map['defaultStatus'] = _defaultStatus;
    map['id'] = _id;
    map['name'] = _name;
    map['positionId'] = _positionId;
    map['ruleType'] = _ruleType;
    map['url'] = _url;
    return map;
  }
}

/// aiGroupId : 0
/// alias : ""
/// belongTo : ""
/// description : ""
/// index : 0
/// name : ""
/// roleList : [{"avatarUrl":"","isExclusive":false,"isPrivate":false,"nickname":"","role":"","roleId":0,"sex":0,"type":0}]

InsertAiGroupList insertAiGroupListFromJson(String str) =>
    InsertAiGroupList.fromJson(json.decode(str));

String insertAiGroupListToJson(InsertAiGroupList data) =>
    json.encode(data.toJson());

class InsertAiGroupList {
  InsertAiGroupList({
    String? aiGroupId,
    String? alias,
    String? belongTo,
    String? description,
    int? index,
    String? name,
    List<RoleList>? roleList,
  }) {
    _aiGroupId = aiGroupId;
    _alias = alias;
    _belongTo = belongTo;
    _description = description;
    _index = index;
    _name = name;
    _roleList = roleList;
  }

  InsertAiGroupList.fromJson(dynamic json) {
    _aiGroupId = json['aiGroupId'];
    _alias = json['alias'];
    _belongTo = json['belongTo'];
    _description = json['description'];
    _index = json['index'];
    _name = json['name'];
    if (json['roleList'] != null) {
      _roleList = [];
      json['roleList'].forEach((v) {
        _roleList?.add(RoleList.fromJson(v));
      });
    }
  }

  String? _aiGroupId;
  String? _alias;
  String? _belongTo;
  String? _description;
  int? _index;
  String? _name;
  List<RoleList>? _roleList;

  InsertAiGroupList copyWith({
    String? aiGroupId,
    String? alias,
    String? belongTo,
    String? description,
    int? index,
    String? name,
    List<RoleList>? roleList,
  }) =>
      InsertAiGroupList(
        aiGroupId: aiGroupId ?? _aiGroupId,
        alias: alias ?? _alias,
        belongTo: belongTo ?? _belongTo,
        description: description ?? _description,
        index: index ?? _index,
        name: name ?? _name,
        roleList: roleList ?? _roleList,
      );

  String? get aiGroupId => _aiGroupId;

  String? get alias => _alias;

  String? get belongTo => _belongTo;

  String? get description => _description;

  int? get index => _index;

  String? get name => _name;

  List<RoleList>? get roleList => _roleList;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['aiGroupId'] = _aiGroupId;
    map['alias'] = _alias;
    map['belongTo'] = _belongTo;
    map['description'] = _description;
    map['index'] = _index;
    map['name'] = _name;
    if (_roleList != null) {
      map['roleList'] = _roleList?.map((v) => v.toJson()).toList();
    }
    return map;
  }
}

/// avatarUrl : ""
/// isExclusive : false
/// isPrivate : false
/// nickname : ""
/// role : ""
/// roleId : 0
/// sex : 0
/// type : 0

RoleList roleListFromJson(String str) => RoleList.fromJson(json.decode(str));

String roleListToJson(RoleList data) => json.encode(data.toJson());

class RoleList {
  RoleList({
    String? avatarUrl,
    bool? isExclusive,
    bool? isPrivate,
    String? nickname,
    String? role,
    String? roleId,
    int? sex,
    int? type,
  }) {
    _avatarUrl = avatarUrl;
    _isExclusive = isExclusive;
    _isPrivate = isPrivate;
    _nickname = nickname;
    _role = role;
    _roleId = roleId;
    _sex = sex;
    _type = type;
  }

  RoleList.fromJson(dynamic json) {
    _avatarUrl = json['avatarUrl'];
    _isExclusive = json['isExclusive'];
    _isPrivate = json['isPrivate'];
    _nickname = json['nickname'];
    _role = json['role'];
    _roleId = json['roleId'];
    _sex = json['sex'];
    _type = json['type'];
  }

  String? _avatarUrl;
  bool? _isExclusive;
  bool? _isPrivate;
  String? _nickname;
  String? _role;
  String? _roleId;
  int? _sex;
  int? _type;

  RoleList copyWith({
    String? avatarUrl,
    bool? isExclusive,
    bool? isPrivate,
    String? nickname,
    String? role,
    String? roleId,
    int? sex,
    int? type,
  }) =>
      RoleList(
        avatarUrl: avatarUrl ?? _avatarUrl,
        isExclusive: isExclusive ?? _isExclusive,
        isPrivate: isPrivate ?? _isPrivate,
        nickname: nickname ?? _nickname,
        role: role ?? _role,
        roleId: roleId ?? _roleId,
        sex: sex ?? _sex,
        type: type ?? _type,
      );

  String? get avatarUrl => _avatarUrl;

  bool? get isExclusive => _isExclusive;

  bool? get isPrivate => _isPrivate;

  String? get nickname => _nickname;

  String? get role => _role;

  String? get roleId => _roleId;

  int? get sex => _sex;

  int? get type => _type;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['avatarUrl'] = _avatarUrl;
    map['isExclusive'] = _isExclusive;
    map['isPrivate'] = _isPrivate;
    map['nickname'] = _nickname;
    map['role'] = _role;
    map['roleId'] = _roleId;
    map['sex'] = _sex;
    map['type'] = _type;
    return map;
  }
}
